<%= form_tag(:controller => "privacies", :action => "update") do %>
  <% if @entity.errors.any? %>
	<div id="error_explanation">
	  <h2><%= pluralize(@privacy.errors.count, "error") %> prohibited this entity from being saved:</h2>

	  <ul>
	  <% @privacy.errors.full_messages.each do |msg| %>
		<li><%= msg %></li>
	  <% end %>
	  </ul>
	</div>
  <% end %>
  <div class="field">
	 <%= label_tag(:setting_search, "Who would you like to be able to search for you?") %></br>
	 <%= select_tag(:setting_search, options_for_select([['Friends',3],
														['Friends of friends',2],
														['Anybody',0]],@privacy.search),
									{:title=>'Choose search privacy option'}) %>
  </div></br>
  <div class="field">
	 <%= label_tag(:setting_requests, "Who would you like to be able to send you friend requests?") %></br>
	 <%= select_tag(:setting_requests, options_for_select([['Nobody',3],
														  ['Friends of friends',2],
														  ['Anybody',0]],@privacy.requests),
									  {:title=>'Choose friend request privacy option'}) %>
  </div></br>
   <div class="field">
	 <%= label_tag(:setting_private_messages, "Who would you like to be able to send you private messages?") %></br>
	 <%= select_tag(:setting_private_messages, options_for_select([['Nobody',3],
																  ['Friends',2],
																  ['Friends of friends',1],
																  ['Anybody',0]],@privacy.private_messaging),
											  {:title=>'Choose private messaging privacy option'}) %>
  </div></br>
   <div class="field">
	 <%= label_tag(:setting_show_stream, "Who would you like to be able to view your personal stream?") %></br>
	 <%= select_tag(:setting_show_stream, options_for_select([['Nobody',3],
															 ['Friends',2],
															 ['Friends of friends',1],
															 ['Anybody',0]],@privacy.stream_view), 
										 {:title=>'Choose search privacy option'}) %>
  </div></br>
  <div class="actions">
	<%= submit_tag "Update privacy settings", :title => "Click here to update" %>
  </div>	  
<% end %>


